package com.whale.entity;

import com.whale.constants.ErrorCode;

public class Response<Entity> {
    /**标识是否错误*/
    public Boolean hasError = true;
    /**错误代码*/
    public Long code = ErrorCode.NETWORK_ERROR.value();
    
    /**错误的时候，错误描述*/
    public String errorMsg;
    
    /**返回结果对象*/
    public Entity  data;
    
    public Response(){
        
    }
    
    public Response(Boolean hasError, Long code){
        super();
        this.hasError = hasError;
        this.code = code;
    }

    public Response(Boolean hasError, Long code, Entity data){
        super();
        this.hasError = hasError;
        this.code = code;
        this.data = data;
    }
}
